import {createRouter, createWebHistory} from 'vue-router'
import HomeView from '../views/HomeView.vue'

const routes = [
    {
        path: '/',
        name: 'home',
        component: HomeView,
        redirect: '/homepage',
        children: [
            {path: '/homepage', component: () => import('../views/home/HomePageView.vue')},
            {path: '/Info', component: () => import('../views/home/InfoView.vue')},
            {path: '/fixed', component: () => import('../views/assets/FixedAssetsView.vue')},
            {path: '/build', component: () => import('../views/assets/BuildView.vue')},
            {path: '/room', component: () => import('../views/assets/RoomView.vue')},
            {path: '/virtual', component: () => import('../views/assets/VirtualAssetsView.vue')},
            {path: '/supplier', component: () => import('../views/assets/SupplierView.vue')},
            {path: '/user', component: () => import('../views/user/UserView.vue')},
            {path: '/dict', component: () => import('../views/dict/DictView.vue')},
            {path: '/dictOption', component: () => import('../views/dict/DictOptionView.vue')},
            {path: '/apply', component: () => import('@/views/application/ApplyView.vue')},
            {path: '/applicationList', component: () => import('@/views/application/ApplicationListView.vue')},
            {path: '/audit', component: () => import('../views/audit/AuditView.vue')},
            {path: '/distribute', component: () => import('../views/audit/DistributeView.vue')},
            {path: '/attachment', component: () => import('../views/assets/AttachmentView.vue')},
            {path: '/details', component: () => import('../views/assets/FixedAssetsDetailsView.vue')},
            {path: '/bus', component: () => import('../views/assets/BusView.vue')}

        ]
    },
    {path: '/login', component: () => import('../views/LoginView')}
]

const router = createRouter({
    history: createWebHistory(process.env.BASE_URL),
    routes
})

export default router
